<?php

class rsrequestmodule_config {
	function form($object) {
		if (!defined('SYS_FORMS')) require_once(BASE.'subsystems/forms.php');
		exponent_forms_initialize();

		$form = new form();
		if (!isset($object->id)) {
            $object->intro_message="";
            $object->not_login_message="";
			$object->submit_success_message="";
		} else {
			$form->meta('id',$object->id);
		}
        $form->register('intro_message','Intro Message',new htmleditorcontrol($object->intro_message));
        $form->register('not_login_message','Message when for guest',new htmleditorcontrol($object->not_login_message));
        $form->register('submit_success_message','Message when submit success',new htmleditorcontrol($object->submit_success_message));
		$form->register('submit','',new buttongroupcontrol('Save','','Cancel'));
		return $form;
	}

	function update($values,$object) {
        $object->submit_success_message=$values['submit_success_message'];
        $object->not_login_message=$values['not_login_message'];
		$object->intro_message=$values['intro_message'];
		return $object;
	}
}

?>